<?php
	$sid=$_SESSION['id'];
	switch (strtolower($catno)){
		case "d204":
			if ($qtychg >= 1 && $qtychg <= 5){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=49 where sn = '$shpsn'";
			}elseif ($qtychg >= 6){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=46 where sn = '$shpsn'";
			}
			$result = mysql_query($sql,$db);
			break;
			
		case "d214":
			if ($qtychg >=1 && $qtychg <= 5){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=66 where sn = '$shpsn'";
			}elseif ($qtychg >= 6){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=60 where sn = '$shpsn'";
			}
			$result = mysql_query($sql,$db);
			break;
			
		case "d209":
			if ($qtychg >=1 && $qtychg <= 5){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=58 where sn = '$shpsn'";
			}elseif ($qtychg >= 6 && $qtychg <= 10){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=53 where sn = '$shpsn'";
			}elseif ($qtychg >= 11 ){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=48 where sn = '$shpsn'";
			}
			$result = mysql_query($sql,$db);
			break;
			
		case "d209":
			if ($qtychg >=1 && $qtychg <= 5){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=58 where sn = '$shpsn'";
			}elseif ($qtychg >= 6 && $qtychg <= 10){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=53 where sn = '$shpsn'";
			}elseif ($qtychg >= 11 ){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=48 where sn = '$shpsn'";
			}
			$result = mysql_query($sql,$db);
			break;
			
		case "d210":
			if ($qtychg >=1 && $qtychg <= 5){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=42 where sn = '$shpsn'";
			}elseif ($qtychg >= 6 && $qtychg <= 10){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=39 where sn = '$shpsn'";
			}elseif ($qtychg >= 11 ){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=36 where sn = '$shpsn'";
			}
			$result = mysql_query($sql,$db);
			break;
			
		case "d207":
			if ($qtychg >=1 && $qtychg <= 5){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=58 where sn = '$shpsn'";
			}elseif ($qtychg >= 6 && $qtychg <= 10){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=53 where sn = '$shpsn'";
			}elseif ($qtychg >= 11 ){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=48 where sn = '$shpsn'";
			}
			$result = mysql_query($sql,$db);
			break;
			
		case "d203-maxi-1":
		case "d200-maxi-1":
			if ($qtychg >=1 && $qtychg <= 5){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=95 where sn = '$shpsn'";
			}elseif ($qtychg >= 6){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=89 where sn = '$shpsn'";
			}
			$result = mysql_query($sql,$db);
			break;
			
		case "d203-mini-1":
			if ($qtychg >=1 && $qtychg <= 5){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=85 where sn = '$shpsn'";
			}elseif ($qtychg >= 6){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=79 where sn = '$shpsn'";
			}
			$result = mysql_query($sql,$db);
			break;
			
		case "d200-mini-1":
			if ($qtychg >=1 && $qtychg <= 5){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=95 where sn = '$shpsn'";
			}elseif ($qtychg >= 6){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=88 where sn = '$shpsn'";
			}
			$result = mysql_query($sql,$db);
			break;
			
		case "d205":
			if ($qtychg >=1 && $qtychg <= 5){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=95 where sn = '$shpsn'";
			}elseif ($qtychg >= 6){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=85 where sn = '$shpsn'";
			}
			$result = mysql_query($sql,$db);
			break;
			
		case "d215":
			if ($qtychg >=1 && $qtychg <= 5){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=125 where sn = '$shpsn'";
			}elseif ($qtychg >= 6){
				$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode',price=115 where sn = '$shpsn'";
			}
			$result = mysql_query($sql,$db);
			break;
			
		default:
			$sql="update shoplist set quantity='$qtychg', promotioncode = '$pmcode' where sn = '$shpsn'";
			$result = mysql_query($sql,$db);
	}
?>